package com.giscloud.amp.entity.vo;

import com.giscloud.amp.entity.AmpStaffAuth;

/**
 * @Author:gxd
 * @Description:
 * @Date: 1:54 2018/3/4
 * @Modified By:
 */
public class AmpStaffAuthVO extends AmpStaffAuth {
    private String statusCdDesc;

    public String getStatusCdDesc() {
        //用户状态 1|在用;2|删除
        if (getStatusCd()==1) {
            return "启用";
        } else if (getStatusCd()==2) {
            return "未启用";
        } else {
            return "未知";
        }
    }
    public void setStatusCdDesc(String statusCdDesc) {
        this.statusCdDesc = statusCdDesc;
    }

    /**
     * 覆写新的equals和hashcode的方法。
     * @param that
     * @return
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AmpStaffAuthVO other = (AmpStaffAuthVO) that;
        return (this.getSystemId() == null ? other.getSystemId() == null : this.getSystemId().equals(other.getSystemId()))
                && (this.getStatusCdDesc() == null ? other.getStatusCdDesc() == null : this.getStatusCdDesc().equals(other.getStatusCdDesc()))
                && (this.getStatusCd() == null ? other.getStatusCd() == null : this.getStatusCd().equals(other.getStatusCd()))
                && (this.getAuthId() == null ? other.getAuthId() == null : this.getAuthId().equals(other.getAuthId()));

    }

    /**
     * 覆写新的equals和hashcode的方法。
     * @return
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
        result = prime * result + ((getStatusCdDesc() == null) ? 0 : getStatusCdDesc().hashCode());
        result = prime * result + ((getStatusCd() == null) ? 0 : getStatusCd().hashCode());
        result = prime * result + ((getAuthId() == null) ? 0 : getAuthId().hashCode());
        return result;
    }
}
